<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - PaintWeb</title>

		<style type="text/css">
			/* default.css */
body
{
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
	width: 800px;
}

.header
{
	clear: both;
	background-color: #ccc;
	padding: 8px;
}

h1
{
	font-size: 150%;
	font-weight: bold;
	padding: 0;
	margin: 1em 0 0 .3em;
}

hr
{
	border: none 0;
	border-top: 1px solid #7F8FB1;
	height: 1px;
}

pre.code
{
	display: block;
	padding: 8px;
	border: 1px dashed #ccc;
}

#index
{
	margin-top: 24px;
	float: left;
	width: 160px;
	position: absolute;
	left: 8px;
	background-color: #F3F3F3;
	padding: 8px;
}

#content
{
	margin-left: 190px;
	width: 600px;
}

.classList
{
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 8px;
	font-family: arial, sans-serif;
	font-size: 1em;
	overflow: auto;
}

.classList li
{
	padding: 0;
	margin: 0 0 8px 0;
}

.summaryTable { width: 100%; }

h1.classTitle
{
	font-size:170%;
	line-height:130%;
}

h2 { font-size: 110%; }
caption, div.sectionTitle
{
	background-color: #7F8FB1;
	color: #fff;
	font-size:130%;
	text-align: left;
	padding: 2px 6px 2px 6px;
	border: 1px #7F8FB1 solid;
}

div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }

.summaryTable td
{
	vertical-align: top;
	padding: 4px;
	border-bottom: 1px #7F8FB1 solid;
	border-right: 1px #7F8FB1 solid;
}

/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
	border-left: 1px #7F8FB1 solid;
	width: 140px;
	text-align: right;
}

td.attributes, .fixedFont
{
	line-height: 15px;
	color: #002EBE;
	font-family: "Courier New",Courier,monospace;
	font-size: 13px;
}

.summaryTable td.nameDescription
{
	text-align: left;
	font-size: 13px;
	line-height: 15px;
}

.summaryTable td.nameDescription, .description
{
	line-height: 15px;
	padding: 4px;
	padding-left: 4px;
}

.summaryTable { margin-bottom: 8px; }

ul.inheritsList
{
	list-style: square;
	margin-left: 20px;
	padding-left: 0;
}

.detailList {
	margin-left: 20px; 
	line-height: 15px;
}
.detailList dt { margin-left: 20px; }

.detailList .heading
{
	font-weight: bold;
	padding-bottom: 6px;
	margin-left: 0;
}

.light, td.attributes, .light a:link, .light a:visited
{
	color: #777;
	font-style: italic;
}

.fineprint
{
	text-align: right;
	font-size: 10px;
}
		</style>
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/PaintWeb.html">PaintWeb</a></li>
	
	<li><a href="../symbols/pwlib.html">pwlib</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.html">pwlib.appEvent</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.appDestroy.html">pwlib.appEvent.appDestroy</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.appInit.html">pwlib.appEvent.appInit</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.canvasSizeChange.html">pwlib.appEvent.canvasSizeChange</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.clipboardUpdate.html">pwlib.appEvent.clipboardUpdate</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.commandRegister.html">pwlib.appEvent.commandRegister</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.commandUnregister.html">pwlib.appEvent.commandUnregister</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.configChange.html">pwlib.appEvent.configChange</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.extensionRegister.html">pwlib.appEvent.extensionRegister</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.extensionUnregister.html">pwlib.appEvent.extensionUnregister</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.guiFloatingPanelStateChange.html">pwlib.appEvent.guiFloatingPanelStateChange</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.guiHide.html">pwlib.appEvent.guiHide</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.guiResizeEnd.html">pwlib.appEvent.guiResizeEnd</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.guiResizeMouseMove.html">pwlib.appEvent.guiResizeMouseMove</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.guiResizeStart.html">pwlib.appEvent.guiResizeStart</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.guiShow.html">pwlib.appEvent.guiShow</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.guiTabActivate.html">pwlib.appEvent.guiTabActivate</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.historyUpdate.html">pwlib.appEvent.historyUpdate</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.imageCrop.html">pwlib.appEvent.imageCrop</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.imageSave.html">pwlib.appEvent.imageSave</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.imageSaveResult.html">pwlib.appEvent.imageSaveResult</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.imageSizeChange.html">pwlib.appEvent.imageSizeChange</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.imageZoom.html">pwlib.appEvent.imageZoom</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.selectionChange.html">pwlib.appEvent.selectionChange</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.shadowAllow.html">pwlib.appEvent.shadowAllow</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.toolActivate.html">pwlib.appEvent.toolActivate</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.toolPreactivate.html">pwlib.appEvent.toolPreactivate</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.toolRegister.html">pwlib.appEvent.toolRegister</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.toolUnregister.html">pwlib.appEvent.toolUnregister</a></li>
	
	<li><a href="../symbols/pwlib.appEvent.viewportSizeChange.html">pwlib.appEvent.viewportSizeChange</a></li>
	
	<li><a href="../symbols/pwlib.appEvents.html">pwlib.appEvents</a></li>
	
	<li><a href="../symbols/pwlib.browser.html">pwlib.browser</a></li>
	
	<li><a href="../symbols/pwlib.dom.html">pwlib.dom</a></li>
	
	<li><a href="../symbols/pwlib.dom.KeyboardEventListener.html">pwlib.dom.KeyboardEventListener</a></li>
	
	<li><a href="../symbols/pwlib.dom.keyCodes.html">pwlib.dom.keyCodes</a></li>
	
	<li><a href="../symbols/pwlib.dom.keyCodes_fixes.html">pwlib.dom.keyCodes_fixes</a></li>
	
	<li><a href="../symbols/pwlib.dom.keyCodes_Safari2.html">pwlib.dom.keyCodes_Safari2</a></li>
	
	<li><a href="../symbols/pwlib.dom.keyNames.html">pwlib.dom.keyNames</a></li>
	
	<li><a href="../symbols/pwlib.extensions.html">pwlib.extensions</a></li>
	
	<li><a href="../symbols/pwlib.extensions.colormixer.html">pwlib.extensions.colormixer</a></li>
	
	<li><a href="../symbols/pwlib.extensions.moodle.html">pwlib.extensions.moodle</a></li>
	
	<li><a href="../symbols/pwlib.extensions.mousekeys.html">pwlib.extensions.mousekeys</a></li>
	
	<li><a href="../symbols/pwlib.fileCache.html">pwlib.fileCache</a></li>
	
	<li><a href="../symbols/pwlib.gui.html">pwlib.gui</a></li>
	
	<li><a href="../symbols/pwlib.guiColorInput.html">pwlib.guiColorInput</a></li>
	
	<li><a href="../symbols/pwlib.guiFloatingPanel.html">pwlib.guiFloatingPanel</a></li>
	
	<li><a href="../symbols/pwlib.guiResizer.html">pwlib.guiResizer</a></li>
	
	<li><a href="../symbols/pwlib.guiTabPanel.html">pwlib.guiTabPanel</a></li>
	
	<li><a href="../symbols/pwlib.tools.html">pwlib.tools</a></li>
	
	<li><a href="../symbols/pwlib.tools.bcurve.html">pwlib.tools.bcurve</a></li>
	
	<li><a href="../symbols/pwlib.tools.cbucket.html">pwlib.tools.cbucket</a></li>
	
	<li><a href="../symbols/pwlib.tools.cpicker.html">pwlib.tools.cpicker</a></li>
	
	<li><a href="../symbols/pwlib.tools.ellipse.html">pwlib.tools.ellipse</a></li>
	
	<li><a href="../symbols/pwlib.tools.eraser.html">pwlib.tools.eraser</a></li>
	
	<li><a href="../symbols/pwlib.tools.hand.html">pwlib.tools.hand</a></li>
	
	<li><a href="../symbols/pwlib.tools.insertimg.html">pwlib.tools.insertimg</a></li>
	
	<li><a href="../symbols/pwlib.tools.line.html">pwlib.tools.line</a></li>
	
	<li><a href="../symbols/pwlib.tools.pencil.html">pwlib.tools.pencil</a></li>
	
	<li><a href="../symbols/pwlib.tools.polygon.html">pwlib.tools.polygon</a></li>
	
	<li><a href="../symbols/pwlib.tools.rectangle.html">pwlib.tools.rectangle</a></li>
	
	<li><a href="../symbols/pwlib.tools.selection.html">pwlib.tools.selection</a></li>
	
	<li><a href="../symbols/pwlib.tools.text.html">pwlib.tools.text</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Class PaintWeb
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
			
				The PaintWeb application object.
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/src_paintweb.js.html">paintweb.js</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class PaintWeb.">
				<caption>Class Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#constructor">PaintWeb</a></b>(win, doc)
							</div>
							<div class="description"></div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class PaintWeb.">
					<caption>Field Summary</caption>
					<thead>
						<tr>
							<th scope="col">Field Attributes</th>
							<th scope="col">Field Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								PaintWeb.<b><a href="../symbols/PaintWeb.html#.baseFolder">baseFolder</a></b>
								</div>
								<div class="description">PaintWeb base folder.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#buffer">buffer</a></b>
								</div>
								<div class="description">Holds the buffer canvas and context references.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#build">build</a></b>
								</div>
								<div class="description">PaintWeb build date (YYYYMMDD).</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#clipboard">clipboard</a></b>
								</div>
								<div class="description">Image in the clipboard.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#commands">commands</a></b>
								</div>
								<div class="description">Holds all the PaintWeb commands.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#config">config</a></b>
								</div>
								<div class="description">Holds all the PaintWeb configuration.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#doc">doc</a></b>
								</div>
								<div class="description">The document element PaintWeb is working with.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;constant&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#ELEMENT_NODE">ELEMENT_NODE</a></b>
								</div>
								<div class="description">Element node type constant.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#elems">elems</a></b>
								</div>
								<div class="description">Holds references to DOM elements.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#events">events</a></b>
								</div>
								<div class="description">Custom application events object.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#extensions">extensions</a></b>
								</div>
								<div class="description">Holds all the PaintWeb extensions.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#gui">gui</a></b>
								</div>
								<div class="description">The graphical user interface object instance.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#history">history</a></b>
								</div>
								<div class="description">The image history.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#image">image</a></b>
								</div>
								<div class="description">Holds image information: width, height, zoom and more.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &lt;constant&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								PaintWeb.<b><a href="../symbols/PaintWeb.html#.INIT_DONE">INIT_DONE</a></b>
								</div>
								<div class="description">Application initialization completed successfully.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &lt;constant&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								PaintWeb.<b><a href="../symbols/PaintWeb.html#.INIT_ERROR">INIT_ERROR</a></b>
								</div>
								<div class="description">Application initialization failed.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &lt;constant&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								PaintWeb.<b><a href="../symbols/PaintWeb.html#.INIT_NOT_STARTED">INIT_NOT_STARTED</a></b>
								</div>
								<div class="description">Application initialization not started.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &lt;constant&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								PaintWeb.<b><a href="../symbols/PaintWeb.html#.INIT_STARTED">INIT_STARTED</a></b>
								</div>
								<div class="description">Application initialization started.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#initialized">initialized</a></b>
								</div>
								<div class="description">Application initialization state.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &lt;inner&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#-kbListener_">kbListener_</a></b>
								</div>
								<div class="description">Holds the keyboard event listener object.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#lang">lang</a></b>
								</div>
								<div class="description">Holds all language strings used within PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#layer">layer</a></b>
								</div>
								<div class="description">Holds the current layer ID, canvas and context references.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#mouse">mouse</a></b>
								</div>
								<div class="description">Holds the last recorded mouse coordinates and the button state (if it's 
down or not).</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#resolution">resolution</a></b>
								</div>
								<div class="description">Resolution information.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#shadowAllowed">shadowAllowed</a></b>
								</div>
								<div class="description">Tells if the current tool allows the drawing of shadows.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#shadowSupported">shadowSupported</a></b>
								</div>
								<div class="description">Tells if the browser supports the Canvas Shadows API.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#stateProperties">stateProperties</a></b>
								</div>
								<div class="description">List of Canvas context properties to save and restore.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &lt;inner&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#-temp_">temp_</a></b>
								</div>
								<div class="description">Holds temporary state information during PaintWeb initialization.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#tool">tool</a></b>
								</div>
								<div class="description">The instance of the active tool object.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#UID">UID</a></b>
								</div>
								<div class="description">Unique ID for the current PaintWeb instance.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#version">version</a></b>
								</div>
								<div class="description">PaintWeb version.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/PaintWeb.html#win">win</a></b>
								</div>
								<div class="description">The window object PaintWeb is working with.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class PaintWeb.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#clipboardPaste">clipboardPaste</a></b>(ev)
								</div>
								<div class="description">Paste the current clipboard image.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#commandRegister">commandRegister</a></b>(id, func)
								</div>
								<div class="description">Register a new command in PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#commandUnregister">commandUnregister</a></b>(id)
								</div>
								<div class="description">Unregister a command from PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#configChangeHandler">configChangeHandler</a></b>(ev)
								</div>
								<div class="description">The <code>configChange</code> application event handler.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#configLoad">configLoad</a></b>()
								</div>
								<div class="description">Asynchronously load the configuration file.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#configReady">configReady</a></b>(xhr)
								</div>
								<div class="description">The configuration reader.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#destroy">destroy</a></b>()
								</div>
								<div class="description">Destroy a PaintWeb instance.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#ev_canvas">ev_canvas</a></b>(ev)
								</div>
								<div class="description">The Canvas events handler.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#ev_keyboard">ev_keyboard</a></b>(ev)
								</div>
								<div class="description">The global keyboard events handler.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#ev_numberInput">ev_numberInput</a></b>(ev)
								</div>
								<div class="description">This is the <code>keypress</code> event handler for inputs of type=number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#extensionLoaded">extensionLoaded</a></b>()
								</div>
								<div class="description">The <code>load</code> event handler for each extension script.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#extensionRegister">extensionRegister</a></b>(id)
								</div>
								<div class="description">Register a new extension into PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#extensionUnregister">extensionUnregister</a></b>(id)
								</div>
								<div class="description">Unregister an extension from PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#guiLoad">guiLoad</a></b>()
								</div>
								<div class="description">Load th PaintWeb GUI.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#guiMarkupReady">guiMarkupReady</a></b>(xhr)
								</div>
								<div class="description">The GUI markup reader.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#guiScriptReady">guiScriptReady</a></b>()
								</div>
								<div class="description">The <code>load</code> event handler for the PaintWeb GUI script.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#historyAdd">historyAdd</a></b>()
								</div>
								<div class="description">Add the current image layer to the history.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#historyGoto">historyGoto</a></b>(pos)
								</div>
								<div class="description">Jump to any ImageData/position in the history.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#historyRedo">historyRedo</a></b>()
								</div>
								<div class="description">Perform action redo.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#historyReset">historyReset</a></b>()
								</div>
								<div class="description">Clear the image history.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#historyUndo">historyUndo</a></b>()
								</div>
								<div class="description">Perform action undo.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageClear">imageClear</a></b>(ev)
								</div>
								<div class="description">Clear the image.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageCrop">imageCrop</a></b>(cropX, cropY, cropWidth, cropHeight)
								</div>
								<div class="description">Crop the image.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageLoad">imageLoad</a></b>(importImage)
								</div>
								<div class="description">Load an image.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageSave">imageSave</a></b>(type)
								</div>
								<div class="description">Save the image.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageSaveResultHandler">imageSaveResultHandler</a></b>(ev)
								</div>
								<div class="description">The <code>imageSaveResult</code> application event handler.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageZoomIn">imageZoomIn</a></b>(ev)
								</div>
								<div class="description">Zoom into the image.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageZoomOut">imageZoomOut</a></b>(ev)
								</div>
								<div class="description">Zoom out of the image.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageZoomReset">imageZoomReset</a></b>(ev)
								</div>
								<div class="description">Reset the image zoom level to normal.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#imageZoomTo">imageZoomTo</a></b>(level)
								</div>
								<div class="description">Change the image zoom level.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#init">init</a></b>(handler)
								</div>
								<div class="description">Initialize PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#initCanvas">initCanvas</a></b>()
								</div>
								<div class="description">Initialize the Canvas elements.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#initCommands">initCommands</a></b>()
								</div>
								<div class="description">Initialize the PaintWeb commands.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#initComplete">initComplete</a></b>()
								</div>
								<div class="description">Initialization procedure which runs after the configuration, language and 
GUI files have loaded.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#initContext">initContext</a></b>()
								</div>
								<div class="description">Initialize the Canvas buffer context.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#initError">initError</a></b>(msg)
								</div>
								<div class="description">Report an initialization error.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#initExtensions">initExtensions</a></b>()
								</div>
								<div class="description">Load all the extensions.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#initTools">initTools</a></b>()
								</div>
								<div class="description">Load all the configured drawing tools.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#jsonlibReady">jsonlibReady</a></b>()
								</div>
								<div class="description">The <code>load</code> event handler for the JSON library script.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#langLoad">langLoad</a></b>()
								</div>
								<div class="description">Asynchronously load the language file.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#langReady">langReady</a></b>(xhr)
								</div>
								<div class="description">The language file reader.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#layerUpdate">layerUpdate</a></b>()
								</div>
								<div class="description">Update the current image layer by moving the pixels from the buffer onto 
the layer.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &lt;inner&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#-preInit">preInit</a></b>()
								</div>
								<div class="description">PaintWeb pre-initialization code.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#pwlibReady">pwlibReady</a></b>()
								</div>
								<div class="description">The <code>load</code> event handler for the PaintWeb library script.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#scriptLoad">scriptLoad</a></b>(url, handler)
								</div>
								<div class="description">Load a script into the document.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#selectAll">selectAll</a></b>(ev)
								</div>
								<div class="description">Select all the pixels.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#selectionCopy">selectionCopy</a></b>(ev)
								</div>
								<div class="description">Copy the available selection.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#selectionCut">selectionCut</a></b>(ev)
								</div>
								<div class="description">Cut the available selection.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#shadowAllow">shadowAllow</a></b>()
								</div>
								<div class="description">Allow shadows.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#shadowDisallow">shadowDisallow</a></b>()
								</div>
								<div class="description">Disallow shadows.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#stateRestore">stateRestore</a></b>(context, stateObj)
								</div>
								<div class="description">Restore the state of a Canvas context.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#stateSave">stateSave</a></b>(context)
								</div>
								<div class="description">Save the state of a Canvas context.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#styleLoad">styleLoad</a></b>(id, url, media, handler)
								</div>
								<div class="description">Insert a stylesheet into the document.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#swapFillStroke">swapFillStroke</a></b>()
								</div>
								<div class="description">Swap the fill and stroke styles.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#toolActivate">toolActivate</a></b>(id, ev)
								</div>
								<div class="description">Activate a drawing tool by ID.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;private&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#toolLoaded">toolLoaded</a></b>()
								</div>
								<div class="description">The <code>load</code> event handler for each tool script.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#toolRegister">toolRegister</a></b>(id)
								</div>
								<div class="description">Register a new drawing tool into PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#toolSnapXY">toolSnapXY</a></b>(x, y)
								</div>
								<div class="description">Perform horizontal/vertical line snapping.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#toolUnregister">toolUnregister</a></b>(id)
								</div>
								<div class="description">Unregister a drawing tool from PaintWeb.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#toString">toString</a></b>()
								</div>
								<div class="description"></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/PaintWeb.html#updateCanvasScaling">updateCanvasScaling</a></b>()
								</div>
								<div class="description">Update the canvas scaling.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			
<!-- ============================== events summary ======================== -->
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Class Detail
				</div>
				
				<div class="fixedFont">
						<b>PaintWeb</b>(win, doc)
				</div>
				
				<div class="description">
					
					
				</div>
				
				
				
				
					
						<dl class="detailList">
						<dt class="heading">Parameters:</dt>
						
							<dt>
								<span class="light fixedFont">{Window}</span>  <b>win</b>
								<i>Optional, Default: window</i>
							</dt>
								<dd>The window object to use.</dd>
						
							<dt>
								<span class="light fixedFont">{Document}</span>  <b>doc</b>
								<i>Optional, Default: document</i>
							</dt>
								<dd>The document object to use.</dd>
						
						</dl>
					
					
					
					
					
					
					

			</div>
			

<!-- ============================== field details ========================== -->		
			
				<div class="sectionTitle">
					Field Detail
				</div>
				
					<a name=".baseFolder"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{String}</span>
					<span class="light">PaintWeb.</span><b>baseFolder</b>
					
					</div>
					<div class="description">
						PaintWeb base folder. This is determined automatically when the PaintWeb 
script is added in a page.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="buffer"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>buffer</b>
					
					</div>
					<div class="description">
						Holds the buffer canvas and context references.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="build"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>build</b>
					
					</div>
					<div class="description">
						PaintWeb build date (YYYYMMDD).
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="clipboard"> </a>
					<div class="fixedFont">
					
					<span class="light">{ImageData}</span>
					<b>clipboard</b>
					
					</div>
					<div class="description">
						Image in the clipboard. This is used when some selection is copy/pasted.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="commands"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>commands</b>
					
					</div>
					<div class="description">
						Holds all the PaintWeb commands. Each property in this object must 
reference a simple function which can be executed by keyboard shortcuts 
and/or GUI elements.
						
						
					</div>
					
					

						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
							<dd><a href="../symbols/PaintWeb.html#commandRegister">PaintWeb#commandRegister</a> Register a new command.</dd>
							
							<dd><a href="../symbols/PaintWeb.html#commandUnregister">PaintWeb#commandUnregister</a> Unregister a command.</dd>
							
							</dl>
						
						

					<hr />
				
					<a name="config"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>config</b>
					
					</div>
					<div class="description">
						Holds all the PaintWeb configuration.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="doc"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Document}</span>
					<b>doc</b>
					
					</div>
					<div class="description">
						The document element PaintWeb is working with.
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								document
							</dd>
							</dl>
						

					<hr />
				
					<a name="ELEMENT_NODE"> </a>
					<div class="fixedFont">&lt;constant&gt; 
					
					<span class="light">{Number}</span>
					<b>ELEMENT_NODE</b>
					
					</div>
					<div class="description">
						Element node type constant.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="elems"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Object}</span>
					<b>elems</b>
					
					</div>
					<div class="description">
						Holds references to DOM elements.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="events"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/pwlib.appEvents.html">pwlib.appEvents</a>}</span>
					<b>events</b>
					
					</div>
					<div class="description">
						Custom application events object.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="extensions"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>extensions</b>
					
					</div>
					<div class="description">
						Holds all the PaintWeb extensions.
						
						
					</div>
					
					

						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
							<dd><a href="../symbols/PaintWeb.html#extensionRegister">PaintWeb#extensionRegister</a> Register a new extension.</dd>
							
							<dd><a href="../symbols/PaintWeb.html#extensionUnregister">PaintWeb#extensionUnregister</a> Unregister an extension.</dd>
							
							<dd>PaintWeb.config.extensions Holds the list of extensions to be loaded 
automatically when PaintWeb is initialized.</dd>
							
							</dl>
						
						

					<hr />
				
					<a name="gui"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/pwlib.gui.html">pwlib.gui</a>}</span>
					<b>gui</b>
					
					</div>
					<div class="description">
						The graphical user interface object instance.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="history"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Object}</span>
					<b>history</b>
					
					</div>
					<div class="description">
						The image history.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="image"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>image</b>
					
					</div>
					<div class="description">
						Holds image information: width, height, zoom and more.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name=".INIT_DONE"> </a>
					<div class="fixedFont">&lt;static&gt; &lt;constant&gt; 
					
					
					<span class="light">PaintWeb.</span><b>INIT_DONE</b>
					
					</div>
					<div class="description">
						Application initialization completed successfully.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name=".INIT_ERROR"> </a>
					<div class="fixedFont">&lt;static&gt; &lt;constant&gt; 
					
					
					<span class="light">PaintWeb.</span><b>INIT_ERROR</b>
					
					</div>
					<div class="description">
						Application initialization failed.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name=".INIT_NOT_STARTED"> </a>
					<div class="fixedFont">&lt;static&gt; &lt;constant&gt; 
					
					
					<span class="light">PaintWeb.</span><b>INIT_NOT_STARTED</b>
					
					</div>
					<div class="description">
						Application initialization not started.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name=".INIT_STARTED"> </a>
					<div class="fixedFont">&lt;static&gt; &lt;constant&gt; 
					
					
					<span class="light">PaintWeb.</span><b>INIT_STARTED</b>
					
					</div>
					<div class="description">
						Application initialization started.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="initialized"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>initialized</b>
					
					</div>
					<div class="description">
						Application initialization state. This property can be in one of the 
following states:

<ul>
  <li><a href="../symbols/PaintWeb.html#.INIT_NOT_STARTED">PaintWeb.INIT_NOT_STARTED</a> - The initialization is not 
  started.

  <li><a href="../symbols/PaintWeb.html#.INIT_STARTED">PaintWeb.INIT_STARTED</a> - The initialization process is 
  running.

  <li><a href="../symbols/PaintWeb.html#.INIT_DONE">PaintWeb.INIT_DONE</a> - The initialization process has completed 
  successfully.

  <li><a href="../symbols/PaintWeb.html#.INIT_ERROR">PaintWeb.INIT_ERROR</a> - The initialization process has failed.
</ul>
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								PaintWeb.INIT_NOT_STARTED
							</dd>
							</dl>
						

					<hr />
				
					<a name="-kbListener_"> </a>
					<div class="fixedFont">&lt;private&gt; &lt;inner&gt; 
					
					<span class="light">{<a href="../symbols/pwlib.dom.KeyboardEventListener.html">pwlib.dom.KeyboardEventListener</a>}</span>
					<b>kbListener_</b>
					
					</div>
					<div class="description">
						Holds the keyboard event listener object.
						
						
					</div>
					
					

						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
							<dd><a href="../symbols/pwlib.dom.KeyboardEventListener.html">pwlib.dom.KeyboardEventListener</a> The class dealing with the 
cross-browser differences in the DOM keyboard events.</dd>
							
							</dl>
						
						

					<hr />
				
					<a name="lang"> </a>
					<div class="fixedFont">
					
					
					<b>lang</b>
					
					</div>
					<div class="description">
						Holds all language strings used within PaintWeb.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="layer"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>layer</b>
					
					</div>
					<div class="description">
						Holds the current layer ID, canvas and context references.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="mouse"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Object}</span>
					<b>mouse</b>
					
					</div>
					<div class="description">
						Holds the last recorded mouse coordinates and the button state (if it's 
down or not).
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="resolution"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>resolution</b>
					
					</div>
					<div class="description">
						Resolution information.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="shadowAllowed"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>shadowAllowed</b>
					
					</div>
					<div class="description">
						Tells if the current tool allows the drawing of shadows.
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								true
							</dd>
							</dl>
						

					<hr />
				
					<a name="shadowSupported"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>shadowSupported</b>
					
					</div>
					<div class="description">
						Tells if the browser supports the Canvas Shadows API.
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								true
							</dd>
							</dl>
						

					<hr />
				
					<a name="stateProperties"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Array}</span>
					<b>stateProperties</b>
					
					</div>
					<div class="description">
						List of Canvas context properties to save and restore.

<p>When the Canvas is resized the state is lost. Using context.save/restore 
state does work only in Opera. In Firefox/Gecko and WebKit saved states are 
lost after resize, so there's no state to restore. As such, PaintWeb has 
its own simple state save/restore mechanism. The property values are saved 
into a JavaScript object.
						
						
					</div>
					
					

						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
							<dd><a href="../symbols/PaintWeb.html#stateSave">PaintWeb#stateSave</a> to save the canvas context state.</dd>
							
							<dd><a href="../symbols/PaintWeb.html#stateRestore">PaintWeb#stateRestore</a> to restore a canvas context state.</dd>
							
							</dl>
						
						

					<hr />
				
					<a name="-temp_"> </a>
					<div class="fixedFont">&lt;private&gt; &lt;inner&gt; 
					
					<span class="light">{Object}</span>
					<b>temp_</b>
					
					</div>
					<div class="description">
						Holds temporary state information during PaintWeb initialization.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="tool"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>tool</b>
					
					</div>
					<div class="description">
						The instance of the active tool object.
						
						
					</div>
					
					

						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
							<dd>PaintWeb.config.toolDefault holds the ID of the tool which is 
activated when the application loads.</dd>
							
							<dd><a href="../symbols/PaintWeb.html#toolActivate">PaintWeb#toolActivate</a> Activate a drawing tool by ID.</dd>
							
							<dd><a href="../symbols/PaintWeb.html#toolRegister">PaintWeb#toolRegister</a> Register a new drawing tool.</dd>
							
							<dd><a href="../symbols/PaintWeb.html#toolUnregister">PaintWeb#toolUnregister</a> Unregister a drawing tool.</dd>
							
							<dd><a href="../symbols/pwlib.tools.html">pwlib.tools</a> holds the drawing tools.</dd>
							
							</dl>
						
						

					<hr />
				
					<a name="UID"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>UID</b>
					
					</div>
					<div class="description">
						Unique ID for the current PaintWeb instance.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="version"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>version</b>
					
					</div>
					<div class="description">
						PaintWeb version.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="win"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Window}</span>
					<b>win</b>
					
					</div>
					<div class="description">
						The window object PaintWeb is working with.
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								window
							</dd>
							</dl>
						

					
				
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name="clipboardPaste"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>clipboardPaste</b>(ev)
					
					</div>
					<div class="description">
						Paste the current clipboard image. This only works when some ImageData is 
available in <a href="../symbols/PaintWeb.html#clipboard">PaintWeb#clipboard</a>.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									<i>Optional</i>
								</dt>
								<dd>The DOM Event object which generated the request.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>The command implementation.</dd>
							
							</dl>
						

					<hr />
				
					<a name="commandRegister"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>commandRegister</b>(id, func)
					
					</div>
					<div class="description">
						Register a new command in PaintWeb. Commands are simple function objects 
which can be invoked by keyboard shortcuts or by GUI elements.

<p>Once the command is successfully registered, this method dispatches the 
<a href="../symbols/pwlib.appEvent.commandRegister.html">pwlib.appEvent.commandRegister</a> application event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The ID of the new command.</dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>func</b>
									
								</dt>
								<dd>The command function.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the command was successfully registered, or 
false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#commandUnregister">PaintWeb#commandUnregister</a> allows you to unregister commands.</dd>
							
								<dd><a href="../symbols/PaintWeb.html#commands">PaintWeb#commands</a> Holds all the registered commands.</dd>
							
							</dl>
						

					<hr />
				
					<a name="commandUnregister"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>commandUnregister</b>(id)
					
					</div>
					<div class="description">
						Unregister a command from PaintWeb.

<p>Before the command is unregistered, this method dispatches the 
<a href="../symbols/pwlib.appEvent.commandUnregister.html">pwlib.appEvent.commandUnregister</a> application event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The ID of the command you want to unregister.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the command was removed successfully, or false 
if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#commandRegister">PaintWeb#commandRegister</a> allows you to register new commands.</dd>
							
								<dd><a href="../symbols/PaintWeb.html#commands">PaintWeb#commands</a> Holds all the registered commands.</dd>
							
							</dl>
						

					<hr />
				
					<a name="configChangeHandler"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>configChangeHandler</b>(ev)
					
					</div>
					<div class="description">
						The <code>configChange</code> application event handler. This method 
updates the Canvas context properties depending on which configuration 
property changed.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{<a href="../symbols/pwlib.appEvent.configChange.html">pwlib.appEvent.configChange</a>}</span> <b>ev</b>
									
								</dt>
								<dd>The application event object.</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="configLoad"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>configLoad</b>()
					
					</div>
					<div class="description">
						Asynchronously load the configuration file. This method issues an 
XMLHttpRequest to load the JSON file.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>PaintWeb.config.configFile The configuration file.</dd>
							
								<dd><a href="../symbols/pwlib.html#.xhrLoad">pwlib.xhrLoad</a> The library function being used for creating the 
XMLHttpRequest object.</dd>
							
							</dl>
						

					<hr />
				
					<a name="configReady"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>configReady</b>(xhr)
					
					</div>
					<div class="description">
						The configuration reader. This is the event handler for the XMLHttpRequest 
object, for the <code>onreadystatechange</code> event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{XMLHttpRequest}</span> <b>xhr</b>
									
								</dt>
								<dd>The XMLHttpRequest object being handled.</dd>
							
							</dl>
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#configLoad">PaintWeb#configLoad</a> The method which issues the XMLHttpRequest request 
for loading the configuration file.</dd>
							
							</dl>
						

					<hr />
				
					<a name="destroy"> </a>
					<div class="fixedFont">
					
					
					<b>destroy</b>()
					
					</div>
					<div class="description">
						Destroy a PaintWeb instance. This method allows you to unload a PaintWeb 
instance. Extensions, tools and commands are unregistered, and the GUI 
elements are removed.

<p>The scripts and styles loaded are not removed, since they might be used 
by other PaintWeb instances.

<p>The <a href="../symbols/pwlib.appEvent.appDestroy.html">pwlib.appEvent.appDestroy</a> application event is dispatched 
before the current instance is destroyed.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="ev_canvas"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Boolean}</span>
					<b>ev_canvas</b>(ev)
					
					</div>
					<div class="description">
						The Canvas events handler.

<p>This method determines the mouse position relative to the canvas 
element, after which it invokes the method of the currently active tool 
with the same name as the current event type. For example, for the 
<code>mousedown</code> event the <code><var>tool</var>.mousedown()</code> 
method is invoked.

<p>The mouse coordinates are stored in the <a href="../symbols/PaintWeb.html#mouse">PaintWeb#mouse</a> object.  
These properties take into account the current zoom level and the image 
scroll.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									
								</dt>
								<dd>The DOM Event object.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the tool event handler executed, or false 
otherwise.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="ev_keyboard"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>ev_keyboard</b>(ev)
					
					</div>
					<div class="description">
						The global keyboard events handler. This makes all the keyboard shortcuts 
work in the web application.

<p>This method determines the key the user pressed, based on the 
<var>ev</var> DOM Event object, taking into consideration any browser 
differences. Two new properties are added to the <var>ev</var> object:

<ul>
  <li><var>ev.kid_</var> is a string holding the key and the modifiers list 
  (<kbd>Control</kbd>, <kbd>Alt</kbd> and/or <kbd>Shift</kbd>). For 
  example, if the user would press the key <kbd>A</kbd> while holding down 
  <kbd>Control</kbd>, then <var>ev.kid_</var> would be "Control A". If the 
  user would press "9" while holding down <kbd>Shift</kbd>, then 
  <var>ev.kid_</var> would be "Shift 9".

  <li><var>ev.kobj_</var> holds a reference to the keyboard shortcut 
  definition object from the configuration. This is useful for reuse, for 
  passing parameters from the keyboard shortcut configuration object to the 
  event handler.
</ul>

<p>In PaintWeb.config.keys one can setup the keyboard shortcuts.  
If the keyboard combination is found in that list, then the associated tool 
is activated.

<p>Note: this method includes some work-around for making the image zoom 
keys work well both in Opera and Firefox.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									
								</dt>
								<dd>The DOM Event object.</dd>
							
							</dl>
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>PaintWeb.config.keys The keyboard shortcuts configuration.</dd>
							
								<dd><a href="../symbols/pwlib.dom.KeyboardEventListener.html">pwlib.dom.KeyboardEventListener</a> The class dealing with the 
cross-browser differences in the DOM keyboard events.</dd>
							
							</dl>
						

					<hr />
				
					<a name="ev_numberInput"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>ev_numberInput</b>(ev)
					
					</div>
					<div class="description">
						This is the <code>keypress</code> event handler for inputs of type=number.  
This function only handles cases when the key is <kbd>Up</kbd> or 
<kbd>Down</kbd>. For the <kbd>Up</kbd> key the input value is increased, 
and for the <kbd>Down</kbd> the value is decreased.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									
								</dt>
								<dd>The DOM Event object.</dd>
							
							</dl>
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#ev_keyboard">PaintWeb#ev_keyboard</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="extensionLoaded"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>extensionLoaded</b>()
					
					</div>
					<div class="description">
						The <code>load</code> event handler for each extension script.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="extensionRegister"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>extensionRegister</b>(id)
					
					</div>
					<div class="description">
						Register a new extension into PaintWeb.

<p>If the extension object being constructed has the 
<code>extensionRegister()</code> method, then it will be invoked, allowing 
any custom extension registration code to run. If the method returns false, 
then the extension will not be registered.

<p>Once the extension is successfully registered, this method dispatches 
the <a href="../symbols/pwlib.appEvent.extensionRegister.html">pwlib.appEvent.extensionRegister</a> application event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The ID of the new extension. The extension object 
constructor must exist in <a href="../symbols/pwlib.extensions.html">pwlib.extensions</a>.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the extension was successfully registered, or 
false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#extensionUnregister">PaintWeb#extensionUnregister</a> allows you to unregister extensions.</dd>
							
								<dd><a href="../symbols/PaintWeb.html#extensions">PaintWeb#extensions</a> Holds all the instances of registered extensions.</dd>
							
								<dd><a href="../symbols/pwlib.extensions.html">pwlib.extensions</a> Holds all the extension classes.</dd>
							
							</dl>
						

					<hr />
				
					<a name="extensionUnregister"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>extensionUnregister</b>(id)
					
					</div>
					<div class="description">
						Unregister an extension from PaintWeb.

<p>If the extension object being destructed has the 
<code>extensionUnregister()</code> method, then it will be invoked, 
allowing any custom extension removal code to run.

<p>Before the extension is unregistered, this method dispatches the 
<a href="../symbols/pwlib.appEvent.extensionUnregister.html">pwlib.appEvent.extensionUnregister</a> application event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The ID of the extension object you want to unregister.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the extension was removed, or false if it does 
not exist or some error occurred.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#extensionRegister">PaintWeb#extensionRegister</a> allows you to register new extensions.</dd>
							
								<dd><a href="../symbols/PaintWeb.html#extensions">PaintWeb#extensions</a> Holds all the instances of registered extensions.</dd>
							
								<dd><a href="../symbols/pwlib.extensions.html">pwlib.extensions</a> Holds all the extension classes.</dd>
							
							</dl>
						

					<hr />
				
					<a name="guiLoad"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>guiLoad</b>()
					
					</div>
					<div class="description">
						Load th PaintWeb GUI. This method loads the GUI markup file, the stylesheet 
and the script.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>PaintWeb.config.guiStyle The interface style file.</dd>
							
								<dd>PaintWeb.config.guiScript The interface script file.</dd>
							
								<dd><a href="../symbols/pwlib.gui.html">pwlib.gui</a> The interface object.</dd>
							
							</dl>
						

					<hr />
				
					<a name="guiMarkupReady"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>guiMarkupReady</b>(xhr)
					
					</div>
					<div class="description">
						The GUI markup reader. This is the event handler for the XMLHttpRequest 
object, for the <code>onreadystatechange</code> event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{XMLHttpRequest}</span> <b>xhr</b>
									
								</dt>
								<dd>The XMLHttpRequest object being handled.</dd>
							
							</dl>
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#guiScriptReady">PaintWeb#guiScriptReady</a> The method which issues the XMLHttpRequest 
request for loading the interface markup file.</dd>
							
							</dl>
						

					<hr />
				
					<a name="guiScriptReady"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>guiScriptReady</b>()
					
					</div>
					<div class="description">
						The <code>load</code> event handler for the PaintWeb GUI script. This 
method creates an instance of the GUI object that just loaded and starts 
loading the GUI markup.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>PaintWeb.config.guiScript The interface script file.</dd>
							
								<dd>PaintWeb.config.guiMarkup The interface markup file.</dd>
							
								<dd><a href="../symbols/pwlib.gui.html">pwlib.gui</a> The interface object.</dd>
							
								<dd><a href="../symbols/pwlib.html#.xhrLoad">pwlib.xhrLoad</a> The library function being used for creating the 
XMLHttpRequest object.</dd>
							
							</dl>
						

					<hr />
				
					<a name="historyAdd"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>historyAdd</b>()
					
					</div>
					<div class="description">
						Add the current image layer to the history.

<p>Once the history state has been updated, this method dispatches the 
<a href="../symbols/pwlib.appEvent.historyUpdate.html">pwlib.appEvent.historyUpdate</a> event.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="historyGoto"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>historyGoto</b>(pos)
					
					</div>
					<div class="description">
						Jump to any ImageData/position in the history.

<p>Once the history state has been updated, this method dispatches the 
<a href="../symbols/pwlib.appEvent.historyUpdate.html">pwlib.appEvent.historyUpdate</a> event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Number|String}</span> <b>pos</b>
									
								</dt>
								<dd>The history position to jump to.

<p>If the value is a number, then it must point to an existing index in the  
<var><a href="../symbols/PaintWeb.html#history">PaintWeb#history</a>.states</var> array.

<p>If the value is a string, it must be "undo" or "redo".</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="historyRedo"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>historyRedo</b>()
					
					</div>
					<div class="description">
						Perform action redo.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#historyGoto">PaintWeb#historyGoto</a> The method invoked by this command.</dd>
							
							</dl>
						

					<hr />
				
					<a name="historyReset"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>historyReset</b>()
					
					</div>
					<div class="description">
						Clear the image history.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.historyUpdate.html">pwlib.appEvent.historyUpdate</a> event.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="historyUndo"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>historyUndo</b>()
					
					</div>
					<div class="description">
						Perform action undo.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#historyGoto">PaintWeb#historyGoto</a> The method invoked by this command.</dd>
							
							</dl>
						

					<hr />
				
					<a name="imageClear"> </a>
					<div class="fixedFont">
					
					
					<b>imageClear</b>(ev)
					
					</div>
					<div class="description">
						Clear the image.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>ev</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="imageCrop"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>imageCrop</b>(cropX, cropY, cropWidth, cropHeight)
					
					</div>
					<div class="description">
						Crop the image.

<p>The content of the image is retained only if the browser implements the 
<code>getImageData</code> and <code>putImageData</code> methods.

<p>This method dispatches three application events: 
<a href="../symbols/pwlib.appEvent.imageSizeChange.html">pwlib.appEvent.imageSizeChange</a>, <a href="../symbols/pwlib.appEvent.canvasSizeChange.html">pwlib.appEvent.canvasSizeChange</a> 
and <a href="../symbols/pwlib.appEvent.imageCrop.html">pwlib.appEvent.imageCrop</a>. The <code>imageCrop</code> event is 
dispatched before the image is cropped. The <code>imageSizeChange</code> 
and <code>canvasSizeChange</code> events are dispatched after the image is 
cropped.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>cropX</b>
									
								</dt>
								<dd>Image cropping start position on the x-axis.</dd>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>cropY</b>
									
								</dt>
								<dd>Image cropping start position on the y-axis.</dd>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>cropWidth</b>
									
								</dt>
								<dd>Image crop width.</dd>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>cropHeight</b>
									
								</dt>
								<dd>Image crop height.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the image was cropped successfully, or false if 
not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="imageLoad"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>imageLoad</b>(importImage)
					
					</div>
					<div class="description">
						Load an image. By loading an image the history is cleared and the Canvas 
dimensions are updated to fit the new image.

<p>This method dispatches two application events: 
<a href="../symbols/pwlib.appEvent.imageSizeChange.html">pwlib.appEvent.imageSizeChange</a> and 
<a href="../symbols/pwlib.appEvent.canvasSizeChange.html">pwlib.appEvent.canvasSizeChange</a>.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Element}</span> <b>importImage</b>
									
								</dt>
								<dd>The image element you want to load into the 
Canvas.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="imageSave"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>imageSave</b>(type)
					
					</div>
					<div class="description">
						Save the image.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.imageSave.html">pwlib.appEvent.imageSave</a> event.

<p><strong>Note:</strong> the "Save image" operation relies on integration 
extensions. A vanilla configuration of PaintWeb will simply open the the 
image in a new tab using a data: URL. You must have some event listener for 
the <code>imageSave</code> event and you must prevent the default action.

<p>If the default action for the <code>imageSave</code> application event 
is not prevented, then this method will also dispatch the 
<a href="../symbols/pwlib.appEvent.imageSaveResult.html">pwlib.appEvent.imageSaveResult</a> application event.

<p>Your event handler for the <code>imageSave</code> event must dispatch 
the <code>imageSaveResult</code> event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>type</b>
									<i>Optional, Default: "auto"</i>
								</dt>
								<dd>Image MIME type. This tells the browser which 
format to use when saving the image. If the image format type is not 
supported, then the image is saved as PNG.

<p>You can use the resulting data URL to check which is the actual image 
format.

<p>When <var>type</var> is "auto" then PaintWeb checks the type of the 
image currently loaded (PaintWeb.config.imageLoad). If the format 
is recognized, then the same format is used to save the image.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="imageSaveResultHandler"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>imageSaveResultHandler</b>(ev)
					
					</div>
					<div class="description">
						The <code>imageSaveResult</code> application event handler. This method 
PaintWeb-related stuff: for example, the PaintWeb.image.modified 
flag is turned to false.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{<a href="../symbols/pwlib.appEvent.imageSaveResult.html">pwlib.appEvent.imageSaveResult</a>}</span> <b>ev</b>
									
								</dt>
								<dd>The application event object.</dd>
							
							</dl>
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>The method which allows you to save the image.</dd>
							
							</dl>
						

					<hr />
				
					<a name="imageZoomIn"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>imageZoomIn</b>(ev)
					
					</div>
					<div class="description">
						Zoom into the image.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{mixed}</span> <b>ev</b>
									
								</dt>
								<dd>An event object which might have the <var>shiftKey</var> 
property. If the property evaluates to true, then the zoom level will 
increase twice more than normal.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#imageZoomTo">PaintWeb#imageZoomTo</a> The method used for changing the zoom level.</dd>
							
								<dd>PaintWeb.config.zoomStep The value used for increasing the zoom level.</dd>
							
							</dl>
						

					<hr />
				
					<a name="imageZoomOut"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>imageZoomOut</b>(ev)
					
					</div>
					<div class="description">
						Zoom out of the image.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{mixed}</span> <b>ev</b>
									
								</dt>
								<dd>An event object which might have the <var>shiftKey</var> 
property. If the property evaluates to true, then the zoom level will 
decrease twice more than normal.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#imageZoomTo">PaintWeb#imageZoomTo</a> The method used for changing the zoom level.</dd>
							
								<dd>PaintWeb.config.zoomStep The value used for decreasing the zoom level.</dd>
							
							</dl>
						

					<hr />
				
					<a name="imageZoomReset"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>imageZoomReset</b>(ev)
					
					</div>
					<div class="description">
						Reset the image zoom level to normal.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>ev</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#imageZoomTo">PaintWeb#imageZoomTo</a> The method used for changing the zoom level.</dd>
							
							</dl>
						

					<hr />
				
					<a name="imageZoomTo"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>imageZoomTo</b>(level)
					
					</div>
					<div class="description">
						Change the image zoom level.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.imageZoom.html">pwlib.appEvent.imageZoom</a> application 
event before zooming the image. Once the image zoom is applied, the 
<a href="../symbols/pwlib.appEvent.canvasSizeChange.html">pwlib.appEvent.canvasSizeChange</a> event is dispatched.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Number|String}</span> <b>level</b>
									
								</dt>
								<dd>The level you want to zoom the image to.

<p>If the value is a number, it must be a floating point positive number, 
where 0.5 means 50%, 1 means 100% (normal) zoom, 4 means 400% and so on.

<p>If the value is a string it must be "+" or "-". This means that the zoom 
level will increase/decrease using the configured 
PaintWeb.config.zoomStep.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the image zoom level changed successfully, or 
false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="init"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>init</b>(handler)
					
					</div>
					<div class="description">
						Initialize PaintWeb.

<p>This method is asynchronous, meaning that it will return much sooner 
before the application initialization is completed.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>handler</b>
									<i>Optional</i>
								</dt>
								<dd>The <code>appInit</code> event handler. Your 
event handler will be invoked automatically when PaintWeb completes 
loading, or when an error occurs.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the initialization has been started 
successfully, or false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="initCanvas"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Boolean}</span>
					<b>initCanvas</b>()
					
					</div>
					<div class="description">
						Initialize the Canvas elements. This method creates the elements and 
sets-up their dimensions.

<p>The layer Canvas element will have the background rendered with the 
color from PaintWeb.config.backgroundColor.

<p>If PaintWeb.config.imageLoad is defined, then the image element 
is inserted into the Canvas image.

<p>All the Canvas event listeners are also attached to the buffer Canvas 
element.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the initialization was successful, or false if 
not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#ev_canvas">PaintWeb#ev_canvas</a> The global Canvas events handler.</dd>
							
							</dl>
						

					<hr />
				
					<a name="initCommands"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Boolean}</span>
					<b>initCommands</b>()
					
					</div>
					<div class="description">
						Initialize the PaintWeb commands.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the initialization was successful, or false if 
not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="initComplete"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>initComplete</b>()
					
					</div>
					<div class="description">
						Initialization procedure which runs after the configuration, language and 
GUI files have loaded.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.appInit.html">pwlib.appEvent.appInit</a> event.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/pwlib.appEvent.appInit.html">pwlib.appEvent.appInit</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="initContext"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					<span class="light">{Boolean}</span>
					<b>initContext</b>()
					
					</div>
					<div class="description">
						Initialize the Canvas buffer context. This method updates the context 
properties to reflect the values defined in the PaintWeb configuration 
file.

<p>Shadows support is also determined. The <a href="../symbols/PaintWeb.html#shadowSupported">PaintWeb#shadowSupported</a> 
value is updated accordingly.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the initialization was successful, or false if 
not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="initError"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>initError</b>(msg)
					
					</div>
					<div class="description">
						Report an initialization error.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.appInit.html">pwlib.appEvent.appInit</a> event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>msg</b>
									
								</dt>
								<dd>The error message.</dd>
							
							</dl>
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/pwlib.appEvent.appInit.html">pwlib.appEvent.appInit</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="initExtensions"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>initExtensions</b>()
					
					</div>
					<div class="description">
						Load all the extensions.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="initTools"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>initTools</b>()
					
					</div>
					<div class="description">
						Load all the configured drawing tools.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="jsonlibReady"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>jsonlibReady</b>()
					
					</div>
					<div class="description">
						The <code>load</code> event handler for the JSON library script.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="langLoad"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>langLoad</b>()
					
					</div>
					<div class="description">
						Asynchronously load the language file. This method issues an XMLHttpRequest 
to load the JSON file.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>PaintWeb.config.lang The language you want for the PaintWeb user 
interface.</dd>
							
								<dd><a href="../symbols/pwlib.html#.xhrLoad">pwlib.xhrLoad</a> The library function being used for creating the 
XMLHttpRequest object.</dd>
							
							</dl>
						

					<hr />
				
					<a name="langReady"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>langReady</b>(xhr)
					
					</div>
					<div class="description">
						The language file reader. This is the event handler for the XMLHttpRequest 
object, for the <code>onreadystatechange</code> event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{XMLHttpRequest}</span> <b>xhr</b>
									
								</dt>
								<dd>The XMLHttpRequest object being handled.</dd>
							
							</dl>
						
						
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#langLoad">PaintWeb#langLoad</a> The method which issues the XMLHttpRequest request 
for loading the language file.</dd>
							
							</dl>
						

					<hr />
				
					<a name="layerUpdate"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>layerUpdate</b>()
					
					</div>
					<div class="description">
						Update the current image layer by moving the pixels from the buffer onto 
the layer. This method also adds a point into the history.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="-preInit"> </a>
					<div class="fixedFont">&lt;private&gt; &lt;inner&gt; 
					
					
					<b>preInit</b>()
					
					</div>
					<div class="description">
						PaintWeb pre-initialization code. This runs when the PaintWeb instance is 
constructed.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="pwlibReady"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>pwlibReady</b>()
					
					</div>
					<div class="description">
						The <code>load</code> event handler for the PaintWeb library script.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="scriptLoad"> </a>
					<div class="fixedFont">
					
					
					<b>scriptLoad</b>(url, handler)
					
					</div>
					<div class="description">
						Load a script into the document.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>url</b>
									
								</dt>
								<dd>The script URL you want to insert.</dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>handler</b>
									<i>Optional</i>
								</dt>
								<dd>The <code>load</code> event handler you want.</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="selectAll"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>selectAll</b>(ev)
					
					</div>
					<div class="description">
						Select all the pixels. This activates the selection tool, and selects the 
entire image.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									<i>Optional</i>
								</dt>
								<dd>The DOM Event object which generated the request.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>The command implementation.</dd>
							
							</dl>
						

					<hr />
				
					<a name="selectionCopy"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>selectionCopy</b>(ev)
					
					</div>
					<div class="description">
						Copy the available selection. This only works when the selection tool is 
active and when some selection is available.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									<i>Optional</i>
								</dt>
								<dd>The DOM Event object which generated the request.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>The command implementation.</dd>
							
							</dl>
						

					<hr />
				
					<a name="selectionCut"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>selectionCut</b>(ev)
					
					</div>
					<div class="description">
						Cut the available selection. This only works when the selection tool is 
active and when some selection is available.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									<i>Optional</i>
								</dt>
								<dd>The DOM Event object which generated the request.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>The command implementation.</dd>
							
							</dl>
						

					<hr />
				
					<a name="shadowAllow"> </a>
					<div class="fixedFont">
					
					
					<b>shadowAllow</b>()
					
					</div>
					<div class="description">
						Allow shadows. This method re-enabled shadow rendering, if it was enabled 
before shadows were disallowed.

<p>The <a href="../symbols/pwlib.appEvent.shadowAllow.html">pwlib.appEvent.shadowAllow</a> event is dispatched.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="shadowDisallow"> </a>
					<div class="fixedFont">
					
					
					<b>shadowDisallow</b>()
					
					</div>
					<div class="description">
						Disallow shadows. This method disables shadow rendering, if it is enabled.

<p>The <a href="../symbols/pwlib.appEvent.shadowAllow.html">pwlib.appEvent.shadowAllow</a> event is dispatched.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="stateRestore"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>stateRestore</b>(context, stateObj)
					
					</div>
					<div class="description">
						Restore the state of a Canvas context.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{CanvasRenderingContext2D}</span> <b>context</b>
									
								</dt>
								<dd>The 2D context where you want to 
restore the state.</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>stateObj</b>
									
								</dt>
								<dd>The state object saved by the 
<a href="../symbols/PaintWeb.html#stateSave">PaintWeb#stateSave</a> method.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the operation was successful, or false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="stateSave"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>stateSave</b>(context)
					
					</div>
					<div class="description">
						Save the state of a Canvas context.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{CanvasRenderingContext2D}</span> <b>context</b>
									
								</dt>
								<dd>The 2D context of the Canvas 
element you want to save the state.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Object}</span> The object has all the state properties and values.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="styleLoad"> </a>
					<div class="fixedFont">
					
					
					<b>styleLoad</b>(id, url, media, handler)
					
					</div>
					<div class="description">
						Insert a stylesheet into the document.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The stylesheet ID. This is used to avoid inserting the 
same style in the document.</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>url</b>
									
								</dt>
								<dd>The URL of the stylesheet you want to insert.</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>media</b>
									<i>Optional, Default: 'screen, projection'</i>
								</dt>
								<dd>The media attribute.</dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>handler</b>
									<i>Optional</i>
								</dt>
								<dd>The <code>load</code> event handler.</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="swapFillStroke"> </a>
					<div class="fixedFont">
					
					
					<b>swapFillStroke</b>()
					
					</div>
					<div class="description">
						Swap the fill and stroke styles. This is just like in Photoshop, if the 
user presses X, the fill/stroke colors are swapped.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.configChange.html">pwlib.appEvent.configChange</a> event 
twice for each color (strokeStyle and fillStyle).
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="toolActivate"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>toolActivate</b>(id, ev)
					
					</div>
					<div class="description">
						Activate a drawing tool by ID.

<p>The <var>id</var> provided must be of an existing drawing tool, one that  
has been installed.

<p>The <var>ev</var> argument is an optional DOM Event object which is 
useful when dealing with different types of tool activation, either by 
keyboard or by mouse events. Tool-specific code can implement different 
functionality based on events.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.toolPreactivate.html">pwlib.appEvent.toolPreactivate</a> event 
before creating the new tool instance. Once the new tool is successfully 
activated, the <a href="../symbols/pwlib.appEvent.toolActivate.html">pwlib.appEvent.toolActivate</a> event is also 
dispatched.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The ID of the drawing tool to be activated.</dd>
							
								<dt>
									<span class="light fixedFont">{Event}</span> <b>ev</b>
									<i>Optional</i>
								</dt>
								<dd>The DOM Event object.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the tool has been activated, or false if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#toolRegister">PaintWeb#toolRegister</a> Register a new drawing tool.</dd>
							
								<dd><a href="../symbols/PaintWeb.html#toolUnregister">PaintWeb#toolUnregister</a> Unregister a drawing tool.</dd>
							
								<dd><a href="../symbols/pwlib.tools.html">pwlib.tools</a> The object holding all the drawing tools.</dd>
							
								<dd><a href="../symbols/pwlib.appEvent.toolPreactivate.html">pwlib.appEvent.toolPreactivate</a></dd>
							
								<dd><a href="../symbols/pwlib.appEvent.toolActivate.html">pwlib.appEvent.toolActivate</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="toolLoaded"> </a>
					<div class="fixedFont">&lt;private&gt; 
					
					
					<b>toolLoaded</b>()
					
					</div>
					<div class="description">
						The <code>load</code> event handler for each tool script.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="toolRegister"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>toolRegister</b>(id)
					
					</div>
					<div class="description">
						Register a new drawing tool into PaintWeb.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.toolRegister.html">pwlib.appEvent.toolRegister</a> 
application event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The ID of the new tool. The tool object must exist in 
<a href="../symbols/pwlib.tools.html">pwlib.tools</a>.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the tool was successfully registered, or false 
if not.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#toolUnregister">PaintWeb#toolUnregister</a> allows you to unregister tools.</dd>
							
								<dd><a href="../symbols/pwlib.tools.html">pwlib.tools</a> Holds all the drawing tools.</dd>
							
								<dd><a href="../symbols/pwlib.appEvent.toolRegister.html">pwlib.appEvent.toolRegister</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="toolSnapXY"> </a>
					<div class="fixedFont">
					
					
					<b>toolSnapXY</b>(x, y)
					
					</div>
					<div class="description">
						Perform horizontal/vertical line snapping. This method updates the mouse 
coordinates to "snap" with the given coordinates.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>x</b>
									
								</dt>
								<dd>The x-axis location.</dd>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>y</b>
									
								</dt>
								<dd>The y-axis location.</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="toolUnregister"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>toolUnregister</b>(id)
					
					</div>
					<div class="description">
						Unregister a drawing tool from PaintWeb.

<p>This method dispatches the <a href="../symbols/pwlib.appEvent.toolUnregister.html">pwlib.appEvent.toolUnregister</a> 
application event.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>id</b>
									
								</dt>
								<dd>The ID of the tool you want to unregister.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> True if the tool was unregistered, or false if it does 
not exist or some error occurred.</dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/PaintWeb.html#toolRegister">PaintWeb#toolRegister</a> allows you to register new drawing tools.</dd>
							
								<dd><a href="../symbols/pwlib.tools.html">pwlib.tools</a> Holds all the drawing tools.</dd>
							
								<dd><a href="../symbols/pwlib.appEvent.toolUnregister.html">pwlib.appEvent.toolUnregister</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="toString"> </a>
					<div class="fixedFont">
					
					
					<b>toString</b>()
					
					</div>
					<div class="description">
						
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="updateCanvasScaling"> </a>
					<div class="fixedFont">
					
					
					<b>updateCanvasScaling</b>()
					
					</div>
					<div class="description">
						Update the canvas scaling. This method determines the DPI and/or zoom level 
used by the browser to render the application. Based on these values, the 
canvas elements are scaled down to cancel any upscaling performed by the 
browser.

<p>The <a href="../symbols/pwlib.appEvent.canvasSizeChange.html">pwlib.appEvent.canvasSizeChange</a> application event is 
dispatched.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					
				
			
			
<!-- ============================== event details ========================= -->		
			
			
			<hr />
		</div>

		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			
			Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.0 on Sat Jun 26 2010 21:56:59 GMT+0300 (EEST)
		</div>
	</body>
</html>
